<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
    <title>列表页示例</title>

    <th:block th:include="fragment_header :: header">
    </th:block>
</head>

<body>

<div th:replace="fragment_menu :: navmenu"></div>

<h1>列表页示例</h1>

<a th:href="@{ ${ #mvc.url('DC#addForm').build() } }" class="btn btn-primary">添加修改示例</a>
<a th:href="@{ ${ #mvc.url('DC#checkBoxForm').build() } }" class="btn btn-primary">CheckBox 示例</a>
<a th:href="@{ ${ #mvc.url('DC#uploadForm').build() } }" class="btn btn-primary">上传文件示例</a>

<div th:text="${dt}"></div>

<table class="table table-striped table-hover">
    <thead>
    <tr>
        <th>ID</th>
        <th>NAME</th>
        <th>&nbsp;</th>
    </tr>
    </thead>

    <tbody>
    <tr th:each="exam: ${examList}">
        <td th:text="${exam.id}"></td>
        <td th:text="${exam.name}"></td>
        <td>
            <form action="#" th:action="@{ /demo/{id}/delete (id=${exam.id}) }" method="post" class="form-horizontal">
                <a href="#" th:href="@{ /demo/{id}/edit ( id=${exam.id}) }" class="btn btn-primary">Edit</a>
                <button class="btn btn-danger" type="submit" name="delete">DELETE</button>
            </form>

        </td>
    </tr>
    </tbody>
</table>


</body>
</html>
